<template>
  <el-button :class="className" @click="resetForm()">重置</el-button>
</template>
<script>
  export default {
    props: {
      className: {
        type: String,
      },
      formName: {
        type: String,
        default: 'queryParams'
      },
      forms: {
        type: Object,
      },
    },
    methods: {
      resetForm() {
        if (this.forms[this.formName]) {
          this.forms[this.formName].resetFields();
        }
      }
    }
  }
</script>
